function toggle_checkboxes(user_count)
{
    var i;
    if(document.getElementById('select_all').checked == true)
    {
	for(i=0;i<user_count;i++)
	{
	    checkbox_name = 'user_'+i;
	    document.getElementById(checkbox_name).checked = true;
	}
    }
    else
    {
	for(i=0;i<user_count;i++)
	{
	    checkbox_name = 'user_'+i;
	    document.getElementById(checkbox_name).checked = false;
	}
    }
}

function toggle_searchbox()
{
    if(document.getElementById('searchbox').style.display == 'none')
    {
	document.getElementById('searchbox').style.display = '';
	document.getElementById('search_title').innerHTML = '- Search For Users';
    }
    else
    {
	document.getElementById('searchbox').style.display = 'none';
	document.getElementById('search_title').innerHTML = '+ Search For Users';
    }
}

function toggle_users()
{
    if(document.getElementById('hor-minimalist-b').style.display == 'none')
    {
	document.getElementById('hor-minimalist-b').style.display = '';
	document.getElementById('users_title').innerHTML = '- Users';
    }
    else
    {
	document.getElementById('hor-minimalist-b').style.display = 'none';
	document.getElementById('users_title').innerHTML = '+ Users';
    }
}

function toggle_user_checkbox(user_checkbox)
{
    if(document.getElementById(user_checkbox).checked == true)
    {
	document.getElementById(user_checkbox).checked = false;
    }
    else
    {
	document.getElementById(user_checkbox).checked = true;
    }
}